const app = getApp()

Page({
  data: {
    banner: [
      "https://manhua.qpic.cn/operation/0/19_23_51_3fa71e4fd07f0f370af0465faa6ccdb5_1555689063579.jpg/0",
      "https://manhua.qpic.cn/operation/0/19_23_51_898a3baa00cba550d9fe64a372bee24a_1555689101098.jpg/0",
      "https://manhua.qpic.cn/operation/0/19_23_52_6234abed1062e3601cd639fd376760a3_1555689133306.jpg/0",
      "https://manhua.qpic.cn/operation/0/19_23_52_c0343c40a42861d776eb2b265015bef2_1555689169278.jpg/0",
      "https://manhua.qpic.cn/operation/0/19_23_53_8968d75fb1619aa30adfaf271a271642_1555689199834.jpg/0"
    ],
    blockList: [{
        "cover": "https://manhua.qpic.cn/vertical/0/31_18_48_9cc9207ef30ff63eb5760b08db398bd2_1522493317646.jpg/210",
        "title": "脱团大作战",
        "description": "变成妹子开后宫"
      },
      {
        "cover": "https://manhua.qpic.cn/vertical/0/17_17_14_15c6ee8113c862daddf4b886a12b24cd.jpg/210",
        "title": "火戟特工",
        "description": "接单除妖，特工参上"
      },
      {
        "cover": "https://manhua.qpic.cn/vertical/0/05_08_42_9e04bd6448969ddae05caf617334ae86_1501893743108.jpg/210",
        "title": "天神纠错组",
        "description": "我的老板是天神~！"
      },
      {
        "cover": "https://manhua.qpic.cn/vertical/0/17_16_12_e255333f25db437c2b3f7465634e84d6.jpg/210",
        "title": "白泽异闻录",
        "description": "白泽，行走的美男计"
      },
      {
        "cover": "https://manhua.qpic.cn/vertical/0/17_17_09_e1117593631cf3e911bcfd4eab872518.jpg/210",
        "title": "整容医师",
        "description": "整形医生的明争暗斗"
      },
      {
        "cover": "https://manhua.qpic.cn/vertical/0/11_15_46_46946230d0e6c8a6fb2131bc534f8514_1536652000382.jpg/210",
        "title": "阿多尼斯",
        "description": "重生女主征服世界"
      }
    ],
  },

  onPullDownRefresh() {
    wx.showLoading({
      title: '正在加载中',
    }); //在标题栏中显示加载
    setTimeout(() => {
      this.getHomeComicData();
      wx.hideLoading(); //完成停止加载
      wx.stopPullDownRefresh() //停止下拉刷新
    }, 2000);
  },

  onLoad: function () {
    this.getHomeComicData();
    wx.setNavigationBarTitle({
      title: '仿腾讯动漫'
    });
  },

  getHomeComicData: function () {
    this.setData({
      banner: this.data.banner,
      blockList: this.data.blockList,
    })
  },

})